\hypertarget{class____Simbox}{}\section{\+\_\+\+\_\+\+Simbox Class Reference}
\label{class____Simbox}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}


初始化一个模拟盒子，这个模拟盒子包含cell信息，粒子信息，场信息。粒子种类信息也在这里。  




{\ttfamily \#include $<$simbox.\+h$>$}



Collaboration diagram for \+\_\+\+\_\+\+Simbox\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d7/d32/class____Simbox__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class____Simbox_a5f87c7d514ccf5948cc8ff3f378630c6}{weight\+\_\+to\+\_\+ptcls} ()
\begin{DoxyCompactList}\small\item\em 高阶电磁场插值到粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_afb9d6cef473b767a475f1523595383f8}{}{\bfseries \+\_\+\+\_\+\+Simbox} (string \&simuname, \hyperlink{class____Date}{\+\_\+\+\_\+\+Date} \&today, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a1069d065630136ab64786177780421d6}{xygridmin}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a57655f5e2f07fccb3e2b202406f2ce9a}{xygridmax}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a3753521e25d09dfcf18ecd05af5d6715}{xycell}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_ac61c21a47245bb844737bedb232efb5c}{xrange}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a4ef3442725fe80643d41d344642bb1ef}{yrange}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_ab5af0df69c2db61e7d3159f410d38a3f}{time}, int \&tsteps, double \&deltat, const int \&\hyperlink{class____Simbox_aedf908b7494da94c9bb34a945e92475e}{species}, const vector$<$ \hyperlink{structParticles}{Particles} $>$ \&\hyperlink{class____Simbox_a7eaa63a7820b216f2dab1bd32295b66c}{spptcl}, long \hyperlink{class____Simbox_ad96ab8cd1482f01d6577a3f51e984d64}{maxid}, const vector$<$ int $>$ \&ppcref, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ int $>$ positionref, int \hyperlink{class____Simbox_a985edc51ee73726ad4193b1ab6dccf83}{disable\+\_\+em}=0)\label{class____Simbox_afb9d6cef473b767a475f1523595383f8}

\item 
\hypertarget{class____Simbox_a1e92c0d0d11b9bf4916c436fe6a8fc83}{}void \hyperlink{class____Simbox_a1e92c0d0d11b9bf4916c436fe6a8fc83}{init} ()\label{class____Simbox_a1e92c0d0d11b9bf4916c436fe6a8fc83}

\begin{DoxyCompactList}\small\item\em 利用构造函数提供的数据进行初始化，初始化cell，粒子，和场 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7fc4ebbf81bf6af1524fcb096a2f3b99}{}int \hyperlink{class____Simbox_a7fc4ebbf81bf6af1524fcb096a2f3b99}{read\+\_\+tables1d} ()\label{class____Simbox_a7fc4ebbf81bf6af1524fcb096a2f3b99}

\begin{DoxyCompactList}\small\item\em 0 代表读取成功 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a198983b9a0b459582be76dc23c258835}{}int \hyperlink{class____Simbox_a198983b9a0b459582be76dc23c258835}{read\+\_\+tables2d} ()\label{class____Simbox_a198983b9a0b459582be76dc23c258835}

\begin{DoxyCompactList}\small\item\em 0 代表读取成功 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7ac220f6de530264114a035adb65865f}{}double \hyperlink{class____Simbox_a7ac220f6de530264114a035adb65865f}{get\+\_\+density} (const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \&xycoords, int sp)\label{class____Simbox_a7ac220f6de530264114a035adb65865f}

\begin{DoxyCompactList}\small\item\em 通过这个函数得到某一左边，sp类粒子的密度，从而进行初始化 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_a03aa279e56801059c052856e68f0a820}{migration} (const int \&myrank)
\begin{DoxyCompactList}\small\item\em 对越界粒子进行处理 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a40b1248622c222d646eccbc4d44db9a9}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a40b1248622c222d646eccbc4d44db9a9}{coords\+\_\+to\+\_\+cell} (const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \&xycoords)\label{class____Simbox_a40b1248622c222d646eccbc4d44db9a9}

\begin{DoxyCompactList}\small\item\em 从坐标到网格的转换 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a228d7b452f6298ae5ac4e6d5e27447cb}{}void \hyperlink{class____Simbox_a228d7b452f6298ae5ac4e6d5e27447cb}{field\+\_\+copy\+\_\+to\+\_\+cell} ()\label{class____Simbox_a228d7b452f6298ae5ac4e6d5e27447cb}

\begin{DoxyCompactList}\small\item\em 场拷贝到网格 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_ab0e530da5a9958f76805fd1e58c4842c}{cell\+\_\+copy\+\_\+to\+\_\+field} (int domain, const int \&myrank)
\begin{DoxyCompactList}\small\item\em 网格的流拷贝到场 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_a1ec1c143154dded2870e4b209b756f80}{advancest1} (const int \&rank)
\begin{DoxyCompactList}\small\item\em 进行演化 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ab0b70a66763f827dd9163f0af964dc6e}{}void \hyperlink{class____Simbox_ab0b70a66763f827dd9163f0af964dc6e}{advancest2} (const int \&rank)\label{class____Simbox_ab0b70a66763f827dd9163f0af964dc6e}

\begin{DoxyCompactList}\small\item\em 演化电场damping \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a4a993474ba3b669444819918ab93d3d1}{}void \hyperlink{class____Simbox_a4a993474ba3b669444819918ab93d3d1}{advancest3} (const int \&rank)\label{class____Simbox_a4a993474ba3b669444819918ab93d3d1}

\begin{DoxyCompactList}\small\item\em 演化磁场反damping，拷贝场到cell，场weight到ptcls \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a795db2e4ff5a8ecfa398ceeceb52dde7}{}void \hyperlink{class____Simbox_a795db2e4ff5a8ecfa398ceeceb52dde7}{advancest4} (const int \&rank, const int \&n)\label{class____Simbox_a795db2e4ff5a8ecfa398ceeceb52dde7}

\begin{DoxyCompactList}\small\item\em 推进粒子 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_a0f9a32e9da537ff1582c012e0893b187}{advancest5} (const int \&rank)
\begin{DoxyCompactList}\small\item\em 进行migration，将粒子weight到grid上，拷贝到field中 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a93813c487c72a548c110f81d94464767}{}void \hyperlink{class____Simbox_a93813c487c72a548c110f81d94464767}{dump} ()\label{class____Simbox_a93813c487c72a548c110f81d94464767}

\begin{DoxyCompactList}\small\item\em 数据dump，目前没用到 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a98a3fbbbd7cd6385e19aa7aa69ef0326}{}long \hyperlink{class____Simbox_a98a3fbbbd7cd6385e19aa7aa69ef0326}{get\+\_\+sp\+\_\+num} (int sp)\label{class____Simbox_a98a3fbbbd7cd6385e19aa7aa69ef0326}

\begin{DoxyCompactList}\small\item\em 得到当前时间点sp类粒子的总数目 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a4801f6cbfa5bfbb5396743385f34d3e6}{}void \hyperlink{class____Simbox_a4801f6cbfa5bfbb5396743385f34d3e6}{init\+\_\+flag} ()\label{class____Simbox_a4801f6cbfa5bfbb5396743385f34d3e6}

\begin{DoxyCompactList}\small\item\em 初始化flag，必须调用 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a5373861b182b76675dd5a957362b01e0}{}void \hyperlink{class____Simbox_a5373861b182b76675dd5a957362b01e0}{set\+\_\+field\+\_\+boundary} (const int bd\+\_\+typer\mbox{[}$\,$\mbox{]}, const int startindexr\mbox{[}$\,$\mbox{]}, const int damplenr\mbox{[}$\,$\mbox{]})\label{class____Simbox_a5373861b182b76675dd5a957362b01e0}

\begin{DoxyCompactList}\small\item\em 设置场的边界条件 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a2738c77370303e4ee37d91a50e07afa2}{}void \hyperlink{class____Simbox_a2738c77370303e4ee37d91a50e07afa2}{copy\+\_\+to\+\_\+pline} (\+\_\+\+\_\+\+Pline \&plinel, \+\_\+\+\_\+\+Pline \&pliner, const int direction)\label{class____Simbox_a2738c77370303e4ee37d91a50e07afa2}

\begin{DoxyCompactList}\small\item\em 拷贝越界粒子数据到\+M\+P\+I数据 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a43ab0c066d297a9f2d6a3f19d79fd80d}{}void \hyperlink{class____Simbox_a43ab0c066d297a9f2d6a3f19d79fd80d}{copy\+\_\+to\+\_\+fline} (\+\_\+\+\_\+\+Fline \&flinel, \+\_\+\+\_\+\+Fline \&fliner, const int direction)\label{class____Simbox_a43ab0c066d297a9f2d6a3f19d79fd80d}

\begin{DoxyCompactList}\small\item\em 拷贝ghostcell场数据到\+M\+P\+I数据 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_a492b128b9136af938b65fc52d618f72f}{copy\+\_\+to\+\_\+jline} (\+\_\+\+\_\+\+Jline \&jlinel, \+\_\+\+\_\+\+Jline \&jliner, const int direction)
\begin{DoxyCompactList}\small\item\em 拷贝ghostcell数据到\+M\+P\+I数据 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7f2414291db5025fab96b861f23a5c30}{}void \hyperlink{class____Simbox_a7f2414291db5025fab96b861f23a5c30}{fline\+\_\+copy\+\_\+to} (\+\_\+\+\_\+\+Fline \&flinel, \+\_\+\+\_\+\+Fline \&fliner, const int direction)\label{class____Simbox_a7f2414291db5025fab96b861f23a5c30}

\begin{DoxyCompactList}\small\item\em 拷贝\+M\+P\+I数据到边界场 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a936f2b5e79a29642f7cc9e4d68cf8d6b}{}void \hyperlink{class____Simbox_a936f2b5e79a29642f7cc9e4d68cf8d6b}{pline\+\_\+copy\+\_\+to} (\+\_\+\+\_\+\+Pline \&plinel, \+\_\+\+\_\+\+Pline \&pliner, const int direction)\label{class____Simbox_a936f2b5e79a29642f7cc9e4d68cf8d6b}

\begin{DoxyCompactList}\small\item\em 拷贝\+M\+P\+I数据到当前越界粒子束中 \end{DoxyCompactList}\item 
void \hyperlink{class____Simbox_a38520d2d15b5b77ab82c9edff1d29557}{jline\+\_\+copy\+\_\+to} (\+\_\+\+\_\+\+Jline \&jlinel, \+\_\+\+\_\+\+Jline \&jliner, const int direction)
\begin{DoxyCompactList}\small\item\em 拷贝\+M\+P\+I网格数据到当前cellgroup数据中 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a5e3e4fb97a63092ee723643cc8be155c}{}void \hyperlink{class____Simbox_a5e3e4fb97a63092ee723643cc8be155c}{set\+\_\+data\+\_\+file} (const vector$<$ string $>$ \&fnames1d, const vector$<$ string $>$ \&fnames2d)\label{class____Simbox_a5e3e4fb97a63092ee723643cc8be155c}

\begin{DoxyCompactList}\small\item\em 设置输入数据文件名 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a8328f09670b5af9a8871fb09ea7821ee}{}void \hyperlink{class____Simbox_a8328f09670b5af9a8871fb09ea7821ee}{set\+\_\+monte\+\_\+carlo} (int monte\+\_\+flags\mbox{[}$\,$\mbox{]})\label{class____Simbox_a8328f09670b5af9a8871fb09ea7821ee}

\begin{DoxyCompactList}\small\item\em 拷贝ｆｌａｇ \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ac3f6fa1020fbbd1b6ea6c02467c4207e}{}void \hyperlink{class____Simbox_ac3f6fa1020fbbd1b6ea6c02467c4207e}{squeeze} ()\label{class____Simbox_ac3f6fa1020fbbd1b6ea6c02467c4207e}

\begin{DoxyCompactList}\small\item\em 对内存进行优化 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a04c43fa0efc9adde528f5a2b1565eb0c}{}void \hyperlink{class____Simbox_a04c43fa0efc9adde528f5a2b1565eb0c}{merge} (const int \&sp)\label{class____Simbox_a04c43fa0efc9adde528f5a2b1565eb0c}

\begin{DoxyCompactList}\small\item\em 对sp类型的粒子进行合并 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class____Simbox_aad94d72a3939da968ce7a8d0dcf0819c}{}string \hyperlink{class____Simbox_aad94d72a3939da968ce7a8d0dcf0819c}{simname}\label{class____Simbox_aad94d72a3939da968ce7a8d0dcf0819c}

\begin{DoxyCompactList}\small\item\em 这个名字将会输出数据文件名的头部 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_acdebe598c8a8b0353213e29d517ec237}{}\hyperlink{class____Date}{\+\_\+\+\_\+\+Date} \hyperlink{class____Simbox_acdebe598c8a8b0353213e29d517ec237}{simdate}\label{class____Simbox_acdebe598c8a8b0353213e29d517ec237}

\begin{DoxyCompactList}\small\item\em 日期，目前没用 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a2734caf8aa18758f81357f0f4e814016}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a2734caf8aa18758f81357f0f4e814016}{basexymax}\label{class____Simbox_a2734caf8aa18758f81357f0f4e814016}

\begin{DoxyCompactList}\small\item\em 所有总模拟盒子的边界 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a22559f8c6244c5f11b1569cd578984e0}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a22559f8c6244c5f11b1569cd578984e0}{basexymin}\label{class____Simbox_a22559f8c6244c5f11b1569cd578984e0}

\begin{DoxyCompactList}\small\item\em 所有总模拟盒子的边界 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a57655f5e2f07fccb3e2b202406f2ce9a}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a57655f5e2f07fccb3e2b202406f2ce9a}{xygridmax}\label{class____Simbox_a57655f5e2f07fccb3e2b202406f2ce9a}

\begin{DoxyCompactList}\small\item\em 盒子的网格标号最大和最小 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a1069d065630136ab64786177780421d6}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a1069d065630136ab64786177780421d6}{xygridmin}\label{class____Simbox_a1069d065630136ab64786177780421d6}

\begin{DoxyCompactList}\small\item\em 盒子的网格标号最大和最小 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a3753521e25d09dfcf18ecd05af5d6715}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Simbox_a3753521e25d09dfcf18ecd05af5d6715}{xycell}\label{class____Simbox_a3753521e25d09dfcf18ecd05af5d6715}

\begin{DoxyCompactList}\small\item\em 盒子中网格的数目 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ac61c21a47245bb844737bedb232efb5c}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_ac61c21a47245bb844737bedb232efb5c}{xrange}\label{class____Simbox_ac61c21a47245bb844737bedb232efb5c}

\begin{DoxyCompactList}\small\item\em 盒子x的范围 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a4ef3442725fe80643d41d344642bb1ef}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a4ef3442725fe80643d41d344642bb1ef}{yrange}\label{class____Simbox_a4ef3442725fe80643d41d344642bb1ef}

\begin{DoxyCompactList}\small\item\em 盒子y的范围 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a45694a355768a17d0da78460c7d24e2b}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a45694a355768a17d0da78460c7d24e2b}{xymax}\label{class____Simbox_a45694a355768a17d0da78460c7d24e2b}

\begin{DoxyCompactList}\small\item\em 盒子，xy最大值 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a6d6a6dbebdbce9237e486e516fef25d9}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_a6d6a6dbebdbce9237e486e516fef25d9}{xymin}\label{class____Simbox_a6d6a6dbebdbce9237e486e516fef25d9}

\begin{DoxyCompactList}\small\item\em 盒子xy最小值 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ab5af0df69c2db61e7d3159f410d38a3f}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_ab5af0df69c2db61e7d3159f410d38a3f}{time}\label{class____Simbox_ab5af0df69c2db61e7d3159f410d38a3f}

\begin{DoxyCompactList}\small\item\em 模拟时间开始和结束点 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a5029561655f03e6ae8819ece8a95e99c}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ int $>$ \hyperlink{class____Simbox_a5029561655f03e6ae8819ece8a95e99c}{position}\label{class____Simbox_a5029561655f03e6ae8819ece8a95e99c}

\begin{DoxyCompactList}\small\item\em 这个position本来是准备在2d M\+P\+I 中记录box位置的，在一维domain分解中没有必要 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ad3349dd5eac6fa46e9f931b7302442fa}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Simbox_ad3349dd5eac6fa46e9f931b7302442fa}{dxy}\label{class____Simbox_ad3349dd5eac6fa46e9f931b7302442fa}

\begin{DoxyCompactList}\small\item\em 网格长宽 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7224b6c1583de931049b974f9c46a1ff}{}int \hyperlink{class____Simbox_a7224b6c1583de931049b974f9c46a1ff}{t\+\_\+steps}\label{class____Simbox_a7224b6c1583de931049b974f9c46a1ff}

\begin{DoxyCompactList}\small\item\em 时间步数，不能自己指定，而是根据给定的网格宽度和时间长度、\+Corant 条件算出。 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_aedf908b7494da94c9bb34a945e92475e}{}int \hyperlink{class____Simbox_aedf908b7494da94c9bb34a945e92475e}{species}\label{class____Simbox_aedf908b7494da94c9bb34a945e92475e}

\begin{DoxyCompactList}\small\item\em 粒子种类，4为默认，但可以不给粒子小于4时，最后面的粒子种类将不会启用 0：电子，1：离子，2：正电子，3：光子 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7eaa63a7820b216f2dab1bd32295b66c}{}vector$<$ \hyperlink{structParticles}{Particles} $>$ \hyperlink{class____Simbox_a7eaa63a7820b216f2dab1bd32295b66c}{spptcl}\label{class____Simbox_a7eaa63a7820b216f2dab1bd32295b66c}

\begin{DoxyCompactList}\small\item\em speices struct info \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a401c24180edf0702b647430fdd3fe18d}{}double \hyperlink{class____Simbox_a401c24180edf0702b647430fdd3fe18d}{delta\+\_\+t}\label{class____Simbox_a401c24180edf0702b647430fdd3fe18d}

\begin{DoxyCompactList}\small\item\em dt 根据网格宽度和\+Corant 条件算出 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ad96ab8cd1482f01d6577a3f51e984d64}{}long \hyperlink{class____Simbox_ad96ab8cd1482f01d6577a3f51e984d64}{maxid}\label{class____Simbox_ad96ab8cd1482f01d6577a3f51e984d64}

\begin{DoxyCompactList}\small\item\em 代表当前box初始化时粒子id最大值 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a9f18ac774a3138c8f40c3f9086d05db7}{}vector$<$ int $>$ \hyperlink{class____Simbox_a9f18ac774a3138c8f40c3f9086d05db7}{ppc}\label{class____Simbox_a9f18ac774a3138c8f40c3f9086d05db7}

\begin{DoxyCompactList}\small\item\em 种类数组，当数组中对应位数为0时，该种类粒子不启用，为1时启用 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a1d2747054968048b27936e922eb2b600}{}bool \hyperlink{class____Simbox_a1d2747054968048b27936e922eb2b600}{flag}\label{class____Simbox_a1d2747054968048b27936e922eb2b600}

\begin{DoxyCompactList}\small\item\em 当flag = 0时，模拟不会启动，因此必须设置该位 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a5b0e0739f7ef801501ffee6f13ae08f7}{}int \hyperlink{class____Simbox_a5b0e0739f7ef801501ffee6f13ae08f7}{bd\+\_\+type} \mbox{[}4\mbox{]}\label{class____Simbox_a5b0e0739f7ef801501ffee6f13ae08f7}

\begin{DoxyCompactList}\small\item\em 电磁场边界类型，为下、上、左、右的顺序，0：反射边界，1：吸收边界，2：周期 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a387bd397868118b46f9a3b5f48e5e884}{}int \hyperlink{class____Simbox_a387bd397868118b46f9a3b5f48e5e884}{startindex} \mbox{[}4\mbox{]}\label{class____Simbox_a387bd397868118b46f9a3b5f48e5e884}

\begin{DoxyCompactList}\small\item\em damplen 开始的网格位置，同样为下、上、左、右 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ab93702c971798ebcae402ac5fd9452a3}{}int \hyperlink{class____Simbox_ab93702c971798ebcae402ac5fd9452a3}{damplen} \mbox{[}4\mbox{]}\label{class____Simbox_ab93702c971798ebcae402ac5fd9452a3}

\begin{DoxyCompactList}\small\item\em damplen 存储场的吸收边界情况下四个边界的damp 网格长度， 顺序为下、上、左、右 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a32c502549741e196cdb22dd35c19addb}{}int \hyperlink{class____Simbox_a32c502549741e196cdb22dd35c19addb}{max\+\_\+ppc}\label{class____Simbox_a32c502549741e196cdb22dd35c19addb}

\begin{DoxyCompactList}\small\item\em 单个网格单种粒子最大数目 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a550a30cf0a1b65876f3eecadd4a5d7d1}{}double \hyperlink{class____Simbox_a550a30cf0a1b65876f3eecadd4a5d7d1}{delta\+\_\+e}\label{class____Simbox_a550a30cf0a1b65876f3eecadd4a5d7d1}

\begin{DoxyCompactList}\small\item\em 允许合并粒子的能量差异 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a6784133b6ab1eb614ed9f4cef3323016}{}double \hyperlink{class____Simbox_a6784133b6ab1eb614ed9f4cef3323016}{delta\+\_\+v}\label{class____Simbox_a6784133b6ab1eb614ed9f4cef3323016}

\begin{DoxyCompactList}\small\item\em 允许合并粒子的速度差异 ratio \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a4f33c5b561aca71747a7efdcc8c69416}{}int \hyperlink{class____Simbox_a4f33c5b561aca71747a7efdcc8c69416}{monte\+\_\+flag} \mbox{[}4\mbox{]}\label{class____Simbox_a4f33c5b561aca71747a7efdcc8c69416}

\begin{DoxyCompactList}\small\item\em 0 不需要开启，１需要开启, 顺序0-\/syn, 1-\/brem, 2-\/bwpair, 3-\/bhpair \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a7b2699aebcb40071a20460e5bc34af17}{}vector$<$ vector$<$ double $>$ $>$ \hyperlink{class____Simbox_a7b2699aebcb40071a20460e5bc34af17}{tables1d}\label{class____Simbox_a7b2699aebcb40071a20460e5bc34af17}

\begin{DoxyCompactList}\small\item\em 可能有2个表0,eta, 1, chi, 2 f, 3 h(eta), 4 T(chi), 5 chi for T, 6 eta for h \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a985edc51ee73726ad4193b1ab6dccf83}{}int \hyperlink{class____Simbox_a985edc51ee73726ad4193b1ab6dccf83}{disable\+\_\+em}\label{class____Simbox_a985edc51ee73726ad4193b1ab6dccf83}

\begin{DoxyCompactList}\small\item\em 0 则开启电磁相互作用, 1 不开启, 默认开启 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a02780963f8e86095ea623540426f38a4}{}vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ \hyperlink{class____Simbox_a02780963f8e86095ea623540426f38a4}{tables2d}\label{class____Simbox_a02780963f8e86095ea623540426f38a4}

\begin{DoxyCompactList}\small\item\em 2d 目前只保存\+P(eta, kappa), P(f, kappa) \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a8796d8691d676c45f0804a0e353759f2}{}vector$<$ vector$<$ double $>$ $>$ \hyperlink{class____Simbox_a8796d8691d676c45f0804a0e353759f2}{bh\+\_\+tables1d}\label{class____Simbox_a8796d8691d676c45f0804a0e353759f2}

\begin{DoxyCompactList}\small\item\em 保存韧致辐射和ｂｈ过程的能量，以及能量比值 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_ab7fc0bad9903af842e5c114c89e39f3e}{}vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ \hyperlink{class____Simbox_ab7fc0bad9903af842e5c114c89e39f3e}{bh\+\_\+tables2d}\label{class____Simbox_ab7fc0bad9903af842e5c114c89e39f3e}

\begin{DoxyCompactList}\small\item\em 保存韧致辐射, bh截面 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a25ca3494d47dc221f0e57e6f6a434992}{}vector$<$ vector$<$ \hyperlink{class____Ptcls}{\+\_\+\+\_\+\+Ptcls} $>$ $>$ \hyperlink{class____Simbox_a25ca3494d47dc221f0e57e6f6a434992}{crossing\+\_\+bd\+\_\+ptcls}\label{class____Simbox_a25ca3494d47dc221f0e57e6f6a434992}

\begin{DoxyCompactList}\small\item\em 存储越界粒子，当前box中所有越过母网格的粒子，是个vector，包含所有类别的粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_a55da2476be7af64277a5714fca617bbe}{}vector$<$ string $>$ \hyperlink{class____Simbox_a55da2476be7af64277a5714fca617bbe}{filenames1d}\label{class____Simbox_a55da2476be7af64277a5714fca617bbe}

\begin{DoxyCompactList}\small\item\em filenames1d, filenames2d \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_aa106ac6355b78f142db2b134c4076bd8}{}vector$<$ string $>$ {\bfseries filenames2d}\label{class____Simbox_aa106ac6355b78f142db2b134c4076bd8}

\item 
\hypertarget{class____Simbox_a5bcfefa55f12a83d66d28b8e23fbd0f4}{}\hyperlink{class____Cellgroup}{\+\_\+\+\_\+\+Cellgroup} \hyperlink{class____Simbox_a5bcfefa55f12a83d66d28b8e23fbd0f4}{cellgroup}\label{class____Simbox_a5bcfefa55f12a83d66d28b8e23fbd0f4}

\begin{DoxyCompactList}\small\item\em 当前box中的所有网格的二维数组，通过指标可以直接访问 \end{DoxyCompactList}\item 
\hypertarget{class____Simbox_aa86ece574ff59da44debc92461c5d2af}{}\hyperlink{class____Fieldgroup}{\+\_\+\+\_\+\+Fieldgroup} \hyperlink{class____Simbox_aa86ece574ff59da44debc92461c5d2af}{fieldgroup}\label{class____Simbox_aa86ece574ff59da44debc92461c5d2af}

\begin{DoxyCompactList}\small\item\em 当前box中所有grid上的场，是fields的一个二维数组 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
初始化一个模拟盒子，这个模拟盒子包含cell信息，粒子信息，场信息。粒子种类信息也在这里。 

\subsection{Member Function Documentation}
\hypertarget{class____Simbox_a1ec1c143154dded2870e4b209b756f80}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!advancest1@{advancest1}}
\index{advancest1@{advancest1}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{advancest1}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::advancest1 (
\begin{DoxyParamCaption}
\item[{const int \&}]{rank}
\end{DoxyParamCaption}
)}\label{class____Simbox_a1ec1c143154dded2870e4b209b756f80}


进行演化 

演化磁场，并damping \hypertarget{class____Simbox_a0f9a32e9da537ff1582c012e0893b187}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!advancest5@{advancest5}}
\index{advancest5@{advancest5}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{advancest5}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::advancest5 (
\begin{DoxyParamCaption}
\item[{const int \&}]{rank}
\end{DoxyParamCaption}
)}\label{class____Simbox_a0f9a32e9da537ff1582c012e0893b187}


进行migration，将粒子weight到grid上，拷贝到field中 

必须开启,因为密度更新也在此过程中. \hypertarget{class____Simbox_ab0e530da5a9958f76805fd1e58c4842c}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!cell\+\_\+copy\+\_\+to\+\_\+field@{cell\+\_\+copy\+\_\+to\+\_\+field}}
\index{cell\+\_\+copy\+\_\+to\+\_\+field@{cell\+\_\+copy\+\_\+to\+\_\+field}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{cell\+\_\+copy\+\_\+to\+\_\+field}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::cell\+\_\+copy\+\_\+to\+\_\+field (
\begin{DoxyParamCaption}
\item[{int}]{domain, }
\item[{const int \&}]{myrank}
\end{DoxyParamCaption}
)}\label{class____Simbox_ab0e530da5a9958f76805fd1e58c4842c}


网格的流拷贝到场 

domain 代表是中心 0 还是边界 1 \hypertarget{class____Simbox_a492b128b9136af938b65fc52d618f72f}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!copy\+\_\+to\+\_\+jline@{copy\+\_\+to\+\_\+jline}}
\index{copy\+\_\+to\+\_\+jline@{copy\+\_\+to\+\_\+jline}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{copy\+\_\+to\+\_\+jline}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::copy\+\_\+to\+\_\+jline (
\begin{DoxyParamCaption}
\item[{\+\_\+\+\_\+\+Jline \&}]{jlinel, }
\item[{\+\_\+\+\_\+\+Jline \&}]{jliner, }
\item[{const int}]{direction}
\end{DoxyParamCaption}
)}\label{class____Simbox_a492b128b9136af938b65fc52d618f72f}


拷贝ghostcell数据到\+M\+P\+I数据 

左和下相同，右和上相同

左和下相同，右和上相同 \hypertarget{class____Simbox_a38520d2d15b5b77ab82c9edff1d29557}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!jline\+\_\+copy\+\_\+to@{jline\+\_\+copy\+\_\+to}}
\index{jline\+\_\+copy\+\_\+to@{jline\+\_\+copy\+\_\+to}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{jline\+\_\+copy\+\_\+to}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::jline\+\_\+copy\+\_\+to (
\begin{DoxyParamCaption}
\item[{\+\_\+\+\_\+\+Jline \&}]{jlinel, }
\item[{\+\_\+\+\_\+\+Jline \&}]{jliner, }
\item[{const int}]{direction}
\end{DoxyParamCaption}
)}\label{class____Simbox_a38520d2d15b5b77ab82c9edff1d29557}


拷贝\+M\+P\+I网格数据到当前cellgroup数据中 

将信息储存在边缘，最后叠加到１上 \hypertarget{class____Simbox_a03aa279e56801059c052856e68f0a820}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!migration@{migration}}
\index{migration@{migration}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{migration}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::migration (
\begin{DoxyParamCaption}
\item[{const int \&}]{myrank}
\end{DoxyParamCaption}
)}\label{class____Simbox_a03aa279e56801059c052856e68f0a820}


对越界粒子进行处理 

particles in this domain will be deleted \hypertarget{class____Simbox_a5f87c7d514ccf5948cc8ff3f378630c6}{}\index{\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}!weight\+\_\+to\+\_\+ptcls@{weight\+\_\+to\+\_\+ptcls}}
\index{weight\+\_\+to\+\_\+ptcls@{weight\+\_\+to\+\_\+ptcls}!\+\_\+\+\_\+\+Simbox@{\+\_\+\+\_\+\+Simbox}}
\subsubsection[{weight\+\_\+to\+\_\+ptcls}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Simbox\+::weight\+\_\+to\+\_\+ptcls (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{class____Simbox_a5f87c7d514ccf5948cc8ff3f378630c6}


高阶电磁场插值到粒子 

采用如同\+E\+P\+O\+C\+H中的粒子三角形，场均匀算法 对相邻的三个cell中的场进行插值到粒子 这里采用相对坐标local

已经验证，没有错误

对中间点进行shift

3 grid near the current cell, since field are all locate on the center

use square area weighting 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
simbox.\+h\end{DoxyCompactItemize}
